package com.h.chatroom.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.h.chatroom.pojo.dataobject.Friend;
import com.h.chatroom.pojo.request.AddFriendRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface FriendMapper{

    //    List<Friend> selectFriendList(@Param(Constants.WRAPPER) Wrapper<Friend> wrapper);
    List<Friend> selectFriendList(Integer userId);

    List<Friend> findFriend(Integer userId, String name);

    void addFriendRequest(Integer fromUserId, Integer toUserId, String reason);

    List<AddFriendRequest> getFriendRequest(Integer toUserId);

    void deleteFriendRequest(Integer fromUserId, Integer toUserId);

    void addFriend(Integer userId, Integer friendId);
}
